package dk.pekilidi.dod;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * User: mpeki
 * Date: 12-12-2007
 * Time: 21:54:02
 */
public class Attribute extends BaseObject {

    public enum AttributeType implements DoDType {
        STRENGTH, SIZE, DEXTERITY, CONSTITUTION, INTELLIGENCE, PSYKE, CARISMA, TEMPER
    }

    private int currentValue;
    private int originalValue;
    private int groupValue;

    public Attribute(){
        super();
    }

    public Attribute(AttributeType type, int value) {
        this.currentValue = this.originalValue = value;
        this.setType(type);
    }

    public int getCurrentValue() {
        return currentValue;
    }

    public void setCurrentValue(int currentValue) {
        this.currentValue = currentValue;
    }

    public int getOriginalValue() {
        return originalValue;
    }

    public void setOriginalValue(int originalValue) {
        this.originalValue = originalValue;
    }

    public int getGroupValue() {
        return groupValue;
    }

    public void setGroupValue(int groupValue) {
        this.groupValue = groupValue;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
                append("currentValue", currentValue).
                append("originalValue", originalValue).
                append("groupValue", groupValue).
                toString();
    }
}
